import request from "@/utils/request";

// 查询规格属性值列表
export function listValues(query) {
  return request({
    url: "/ktmall/values/list",
    method: "get",
    params: query,
  });
}

// 查询规格属性值详细
export function getValues(id) {
  return request({
    url: "/ktmall/values/" + id,
    method: "get",
  });
}

// 查询规格属性列表
export function getAttrValues() {
  return request({
    url: "/ktmall/values/attrList",
    method: "get",
  });
}

// 新增规格属性值
export function addValues(data) {
  return request({
    url: "/ktmall/values",
    method: "post",
    data: data,
  });
}

// 修改规格属性值
export function updateValues(data) {
  return request({
    url: "/ktmall/values",
    method: "put",
    data: data,
  });
}

// 删除规格属性值
export function delValues(id) {
  return request({
    url: "/ktmall/values/" + id,
    method: "delete",
  });
}
